Repository navigation
[26.2] Fix registry-based conditions in datapack registry and reloadable registry loading - #3451
Merged
Merged
Conversation
|
Member
|
JavaSourceTransformer 2.0.11 has been released, which includes neoforged/JavaSourceTransformer#67 for fixing application of anonymous class-affecting AT entries. Based on my previous testing, that fixes the blocking issue here of that access modifier change. |
Merged
pupnewfster
requested changes
Sep 10, 2026
pupnewfster
approved these changes
Sep 10, 2026
|
🚀 This PR has been released as NeoForge version |
This was referenced Sep 11, 2026
Contributor
|
Created backport PR: #3511 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes registry-based loading conditions (
neoforge:tag_empty,neoforge:registered) in datapack registry and reloadable registry loading.Every "layer" of datapack loading (datapack registry, reloadable registry, reload listener) is given access to the contents and tags of all prior layers and static registries. To make this work for tag contents, the condition context must interogate both the "context registries" and the captured "pending tags". This is due to a discrepancy in tag loading between initial load and reload:
This is however only an issue for introspecting tag contents during loading, the
HolderSets for all tags are accessible via the "context registries", they may just not be bound yet.The test already tries testing for access to tags on reloadable registries but 26.2 does not load tags for reloadable tags, so the non-empty case is excluded and marked as TODO for 26.3 where reloadable registries use the same loading code as datapack registries and therefore have working tags.
I also took the liberty to guard loading condition evaluation, forwarding the error cleanly to the caller instead of letting the exception bubble up into code that is at best capable of handling the GSON exceptions, if any at all.
At the moment, this PR does not pass formatting because I had to use a patch for an access change due to a limitation in JST.
Fixes #3441